import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsUUID } from 'class-validator';
import { IAssignPermissions } from '@nbase/shared';

/**
 * 分配权限 DTO
 * 为角色分配菜单/权限
 */
export class AssignPermissionsDto implements IAssignPermissions {
  @ApiProperty({
    description: '菜单ID列表（权限）',
    example: ['uuid-1', 'uuid-2'],
    type: [String],
  })
  @IsArray()
  @IsUUID('all', { each: true })
  menuIds!: string[];
}

